<?php
/**
 * Fallback functions for servers that don't support multibyte string functions
 * @author Erko Risthein <erko@risthein.ee>
 * @copyright Copyright (C) 2009 Erko Risthein
 * @link http://erko.risthein.ee/decode/
 * @license http://www.gnu.org/licenses/ GNU General Public License
 * @package decode_explorer
 */
if (!function_exists('mb_substr')) {
	function mb_substr($string, $start, $length = null, $encoding = null) {
		if ($length == null) {
			$length = strlen($string);
		}
		return substr($string, $start, $length);
	}
}	
if (!function_exists('mb_strrpos')) {
	function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) {
		return strrpos($haystack, $needle, $offset);
	}
}
if (!function_exists('mb_strlen')) {
	function mb_strlen($string, $encoding = null) {
		return strlen($string);
	}
}
if (!function_exists('mb_strtolower')) {
	function mb_strtolower($string, $encoding = null) {
		return strtolower($string);
	}
}
if (!function_exists('mb_strripos')) {
	function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) {
		return strripos($haystack, $needle, $offset);
	}
}
?>